<!DOCTYPE html>
<html>
  
  <head>
    <title>360商城</title>
    <link rel=stylesheet href="{{asset('car/Css/qikoo-v.css')}}">
    <link rel=stylesheet href="{{asset('car/Css/v3203b5.css')}}">
    <link rel=stylesheet href="{{asset('car/Css/qiku.css')}}">
    <link rel=stylesheet href="{{asset('car/Css/store.css')}}">
    <link rel=stylesheet href="{{asset('car/Css/qikoo_user.css')}}">
  </head> 
  
  <body id=body>
       <div class="mod-header">
        <div class="topbox" id="gotop">
             <div class="top-container">
                 <ul>
                    <li class="topbox-item leftitem" style="margin-left:-10px">
                        <a data-monitor="home_top_buy" target="_blank" href="#">企业采购</a></li>
                    <li class="topbox-item leftitem">
                        <a data-monitor="home_top_help" target="_blank" href="#">帮助中心</a></li>
                    <li class="topbox-item leftitem">
                        <a data-monitor="home_top_collect" class="js-connect" href="javascript:;">收藏本站</a></li>
                    <li class="topbox-item leftitem">
                        <a data-monitor="home_top_in" href="http://mall.360.com/help/product" target="_blank">商品入驻</a></li>
                    <li class="topbox-item leftitem">
                        <a data-monitor="home_top_old" href="http://watch.mall.360.com/apply" target="_blank">老人手环申请</a></li>
                    <li class="topbox-item leftitem">
                        <a data-monitor="home_top_app" target="_blank" href="http://mall.360.com/xia/zai" class="telshop">
                            <i>
                            </i>手机360商城</a>
                    </li>
                    <li class="topbox-item rightitem" style="margin-right:-10px">
                        <a data-monitor="home_top_order" href="http://mall.360.com/user/myorder" target="_blank">我的订单</a></li>
                    <li class="topbox-item rightitem hassx">
                        <a href="http://mall.360.com/f" target="_blank" data-monitor="home_top_fcode">F码购买</a></li>
                    <li class="topbox-item rightitem navloginbox">
                        <div class="loginbefore nloginWrap">
                            <a class="btn-login-pop" href="javascript:;" id="land" data-monitor="home_top_login">登录</a>
                            <a class="btn-reg-pop" onclick="return false" href="javascript:;" data-monitor="home_top_registe" id="reg">注册</a></div>
                        <div class="loginafter loginWrap" style="display:none">
                            <span class="top-uname popUsername">@if(session()->get("username")) {{session()->get("username")->username}} @endif</span>
                            <div class="popbox">
                                <a class="top-uname popUsername" href="http://mall.360.com/user" target="_blank" data-monitor="home_top_user">@if(session()->get("username")) {{session()->get("username")->username}} @endif</a>
                                <ul class="topuserbox">
                                    <li>
                                        <a href="" target="_blank" data-monitor="home_top_myorder">我的订单</a></li>
                                    <li>
                                        <a href="" target="_blank" data-monitor="home_top_mycoupon">我的优惠券</a></li>
                                    <li>
                                        <a href="" target="_blank" data-monitor="home_top_myfavorite">我的喜欢</a></li>
                                    <li>
                                        <a href="" target="_blank" data-monitor="home_top_try">我的试用</a></li>
                                    <li>
                                        <a href="" target="_blank" data-monitor="home_top_point">试用积分</a></li>
                                    <li>
                                        <a href="" target="_blank" data-monitor="home_top_book">我的预约</a></li>
                                    <li>
                                        <a href="" target="_blank" data-monitor="home_top_address">收货地址</a></li>
                                    <li>
                                        <a href="" target="_blank" data-monitor="home_top_set">账号设置</a></li>
                                    <li>
                                        <a href="/Home/login/loginout" data-monitor="home_top_out">退出登录</a></li>
                                </ul>
                            </div>
                        </div>
                    </li>
                </ul>
        </div>
    </div>      
      <div class="top-container">
        <div class="header-logo">
          <a class=sellogo href="http://mall.360.com" data-monitor=home_title_logo>
            <img src="{{asset('car/Picture/t013cfce5d46cdb1b5f.png')}}"></a>
        </div>
        <div class="header-tools">
        
             <div class="suggest-box">
              <form id=__mall_search_form__ action="/search/">
                <input type=text id=__mall_search_kw__ class=suggest name=q>
                <input type=submit value="" class="search-btn" id=__mall_search_btn__ data-monitor=home_search_button></form>
              <p class=searchkey>
                <a href="http://mall.360.com/shouji/q5" target=_blank>360手机Q5</a>
                <a href="http://mall.360.com/ac/badilong" target=_blank>360儿童手表5C</a>
                <a href="http://mall.360.com/shop/item?item_id=5799719b4ae38d2fa0ac5ee7" target=_blank>360儿童机器人</a>
                <a href="http://mall.360.com/rush/item?item_id=57876cb3215ea061b38eb52f" target=_blank>360手机N4S</a></p>
            </div>

           <!--  <div class=topshopcart>
              <a href="http://mall.360.com/shop/shopcart" target=_blank class="header-cart" data-monitor=home_title_shopcart>
                <i class=icon></i>我的购物车
                <span class="cart-size">(0)</span></a>
              <div class="header-cart-popup">
                <div class="cart-tips">正在加载购物车...</div>
                <div class="cart-info"></div>
              </div>
            </div> -->


        </div>
      </div>
      <div class=navbox>
        <div class="top-container">
          <div class=sublistbox></div>
          <ul class="navbar column-list clearfix">
            <li class="top-item topfirst">
              <a data-monitor=home_fenlei_allgoods href="http://mall.360.com/search/?sort=weight" target=_blank>全部智能酷品</a>
              <li class="top-item" data-type=1>
                <a href="http://mall.360.com/ac/360shouji" data-monitor=home_title_goods1 target=_blank>手机</a>
                <li class="top-item" data-type=2>
                  <a href="http://che.mall.360.com/index.html" data-monitor=home_title_goods2 target=_blank>行车记录仪</a>
                  <li class="top-item" data-type=3>
                    <a href="http://kids.360.com/index.html?utm_source=sydbdh_03&utm_medium=inside" data-monitor=home_title_goods3 target=_blank>儿童手表</a>
                    <li class="top-item" data-type=4>
                      <a data-monitor=home_title_goods4 href="http://jia.mall.360.com/?utm_source=sydbdh_04&utm_medium=inside" target=_blank>智能摄像机</a>
                      <li class="top-item" data-type=5>
                        <a data-monitor=home_title_goods5 href="http://luyou.mall.360.com/?utm_source=sydbdh_05&utm_medium=inside" target=_blank>路由器</a>
                        <li class="top-item" data-type=6>
                          <a data-monitor=home_title_goods5 href="#" target=_blank>儿童机器人</a>
                          <li class="top-item" data-type=7>
                            <a data-monitor=home_title_goods6 target=_blank href="#">智品牌</a>
                            <li class="top-item" data-type=8>
                              <a data-monitor=home_title_goods7 target=_blank href="http://mall.360.com/activity/duobao_erweima">一元夺宝</a>
                              <li class="top-item" data-type=9>
                                <a data-monitor=home_title_goods8 target=_blank href="http://mall.360.com/try/list">试用</a>
                                <li class="top-item" data-type=10>
                                  <a data-monitor=home_title_goods9 href="http://bbs.360.cn">社区</a></ul>
        </div>
      </div>
    </div>

 
      @if(session()->get("shoplist"))
        <div class=gCart>
          <div class=hd>
            <h3>我的购物车</h3>
            </div>
          <div class=bd>
                <div class=cartList>
                  <div class=hd>
                    <div class=col1>商品信息</div> <div class=col2>单价</div> <div class=col3>数量</div>
                    <div class=col3>小计</div><div class=col2>操作</div></div>
                  <style>.wrap_row{border-bottom:1px dashed #eee}.icon_zp{background-color:#F95E38;color:#fff}.icon_zp,.icon_zp_no{border-radius:2px;display:inline-block;padding:2px 5px}.icon_zp_no{background-color:#ededed;color:#333}.zp_title{margin:6px 0 2px}.zp_chose{color:#c00;cursor:pointer}.zp_info{line-height:16px;overflow:hidden;padding-left:15px;text-align:left}.row_list{background-color:#F5F5F5}.wrap_zp{margin-bottom:15px;margin-top:-15px;position:relative}.zp_sanjiao{border:15px solid #fff;border-bottom:15px solid #F5F5F5;height:0;left:67px;position:absolute;width:0}.zp_space{height:30px}.dn{display:none}.wrap_row:last-child{border-bottom:0}.row_list .r3{font-size:16px}.cartList .bd .row{border-bottom:0}</style>
                  
                  <div class=bd>
                
                    @foreach(session()->get("shoplist") as $v)
               <form class="cart nobottommargin clearfix" method="get" action='/Home/address/index' enctype='multipart/form-data'>{{ csrf_field() }}
                   <div class=wrap_row data-item_id="56e38c335efb116a378b4568" id="fpa">

                      <div class=row data-item_id="56e38c335efb116a378b4568" data-limit="5" data-store="222">             
                        <div class=r0>  <input type="hidden"  name="id" value="{{$v->id}}" >
                         </div>
                        <div class=r1>
                          <img class="item-img" src="{{$v->goodspic}}">
                          <a class="item-namexx" href="/upload/s_174701473605567.jpg" target=_blank>
                              {{$v->goodsname}}
                          </a>
                          </a>
                           <input type="hidden"   name="goodsname" value="{{$v->goodsname}}" >

                        </div>
                        <div class=r2>
                         <!-- 商品的单价 -->
                          <span id="price">{{$v->goodsprice}}</span>元
                          <input type="hidden"   name="goodsprice" value="{{$v->goodsprice}}" >
                        </div>
                       
                        <div class=r3>
                          
                          <div class=gcIpt data-monitor=shopcart_number_click>
                          <!-- 数量的减少 -->
                            <a href="javascript:void(0);" class=decrement></a>
                                <!-- 商品的数量 -->
                               <input type=text class=goodsCount name="num" value="{{$v->m}}" >
                                  
                              <!-- 数量的增加 -->
                            <a href="javascript:void(0);" class=increment></a>
                            
                              <!-- 商品的库存量 -->
                             <input type=hidden class=max name="gnum" value="{{$v->goodsnum}}">

                             <input type=hidden class=max name="id" value="{{$v->id}}">
                          </div>
                     
                          </div>
                       
                        <div class=r4>
                          <!-- 商品的小计 -->
                          <span class="amount">{{$v->goodsprice*$v->m}}</span>元</div>
                        <div class=r5>
                           &nbsp;&nbsp;&nbsp;
                          <a href="{{url('/Home/car/del')}}/{{$v->id}}" data-monitor=shopcart_delete_click class=delOrder item_id="56e38c335efb116a378b4568">删除</a>  &nbsp;&nbsp;&nbsp;
                          <!-- 多选框 -->
                          <input type="checkbox" class=goodsCount name='check[]'>
                        </div>
                     </div>
                </div>
               
              @endforeach<!-- 商品总计 -->
                  </div>
                  <div class=gAmount  >商品总计：
                    <span id="total">0</span>元</div>

                  <div class=btn>
                  <!--   <a href="/" class=b1 title="清空购物车" style="display:block;margin-right:200px; line-height:100px;" data-monitor=shopcart_continueshop_click>清空购物</a>
                   -->

                    <a href="/" class=b1 title="继续购物" data-monitor=shopcart_continueshop_click>继续购物</a>
                    <a href="/Home/address/index" class=b2 title="去结算" data-monitor=shopcart_placeorder_click>去结算</a>
                   <!--   <input type="submit" value="去结账"   style="font-size:30px;"> -->
                    </div>

                  </div>
                </form>
          </div>
     </div>
     @elseif(!session()->get("shoplist"))
        <div class=gCart>
       <div class=hd>
         <h3>我的购物车</h3></div>
       <div class=bd>
         <div class=cartEmpty>
           <a href="/shop" title="马上去购物" class=toShoping></a>
         </div>
       </div>
       </div>
    @endif
       <script src="/back/js/libs/jquery-1.8.3.min.js"></script>
       <script type="text/javascript">
          //获取商品的库存
          var gnum = {{$v->goodsnum}};
        
          //做一个商品的数量加法
          // alert($);
          $('.increment').click(function(){
                //商品数量加一
                 var v = $(this).prev().val();
                 //alert(v);
                  v++;
                  //商品的最大不能超过库存数量
                  if(v > gnum) {v =gum}
                  // 写到商品数量里
                  $(this).prev().val(v);

                  //获取id
                 var id= $(this).parents('#fpa').find('.r0').find('input[name="id"]').val();
                   //alert(id);
                  //ajax 
                 $.get("{{url('/Home/car/change')}}",{v:v,id:id},function(data){
                          console.log(data); 
                  });
           
                  //获取商品的单价
                  var price =$(this).parents('.r3').prev().find('#price').html();
                  
                  //计算小计并写入小计
                var prices =price*v
                   $(this).parents('#fpa').find('.r4').find('.amount').html(prices);
                  total();
          })
          //做一个商品的数量减法
          //获取商品的数量
          $('.decrement').click(function(){
            //商品数量减一
            var v =$(this).next().val();// alert(v);
              v--;
            //商品最小为1
            if(v < 1){v =1};
            $(this).next().val(v);

            //获取id
            var id= $(this).parents('#fpa').find('.r0').find('input[name="id"]').val();
                  // alert(id);
                  //ajax 
                 $.get("{{url('/Home/car/change')}}",{v:v,id:id},function(data){
                          console.log(data); 
                  });


            //获取商品的价格
             var price =parseFloat($(this).parents('.r3').prev().find('#price').html());
         
            //计算小计 并写入
              var prices =price*v;
              $(this).parents('#fpa').find('.r4').find('.amount').html(prices);

                total();
          })


          //选中计算并写入总计
          $('.goodsCount').click(function(){
            
            total();
          })
       
          function total(){

           var tot = 0;
            $('input[type="checkbox"]:checked').each(function(){
                
                var jine =parseFloat($(this).parents('.r5').prev().find('.amount').html());
               
                tot += jine;               
            }); 
              
        
            $('#total').html(tot);
       }
       </script>

  

    <div class="mod-footer">
        <div class="foot-bannerw">
            <div class="foot-banner clearfix">
                <div class="banner-item">

                        <i class="icon1">7</i>7天无理由退货</div>
                <div class="banner-item">

                        <i class="icon2">15</i>15天免费换货</div>
                <div class="banner-item">
                    <i class="icon3">包</i>满99元包邮</div>
                <div class="banner-item">

                        <i class="icon4">服</i>手机特色服务</div>
            </div>
        </div>
        <div class="foot-containerw">
            <div class="foot-container clearfix">
                <dl class="foot-con">
                    <dt data-monitor="home_foot_freshman">帮助中心</dt>
                    <dd data-monitor="home_help_freshman">
                        <a target="_blank" href="#" rel="nofollow">用户注册</a></dd>
                    <dd>
                        <a target="_blank" href="#" rel="nofollow">用户登录与密码找回</a></dd>
                    <dd>
                        <a target="_blank" href="#" rel="nofollow">购买指南</a></dd>
                    <dd>
                        <a target="_blank" href="#" rel="nofollow">支付方式</a></dd>
                    <dd>
                        <a target="_blank" href="#" rel="nofollow">配送与说明</a></dd>
                </dl>
                <dl class="foot-con">
                    <dt data-monitor="home_foot_help">售后服务</dt>
                    <dd data-monitor="home_help_help">
                        <a target="_blank" href="#" rel="nofollow">7 日无理由退货</a></dd>
                    <dd>
                        <a target="_blank" href="#" rel="nofollow">质量问题 15 日内换货</a></dd>
                    <dd>
                        <a target="_blank" href="#" rel="nofollow">保修条款</a></dd>
                    <dd>
                        <a target="_blank" href="#" rel="nofollow">服务流程</a></dd>
                    <dd>
                        <a target="_blank" href="#" rel="nofollow">安迷之家</a></dd>
                </dl>
                <dl class="foot-con">
                    <dt data-monitor="home_foot_guide">特色服务</dt>
                    <dd data-monitor="home_help_guide">
                        <a target="_blank" href="#" rel="nofollow">F码通道</a></dd>
                    <dd>
                        <a target="_blank" href="#" rel="nofollow">免费试用</a></dd>
                    <dd>
                        <a target="_blank" href="#" rel="nofollow">360 生态</a></dd>
                    <dd>
                        <a target="_blank" href="#" rel="nofollow">一元夺宝</a></dd>
                </dl>
                <dl class="foot-con">
                    <dt data-monitor="home_foot_tuiguang">推广合作</dt>
                    <dd data-monitor="home_help_try">
                        <a target="_blank" href="#" rel="nofollow">商品入驻</a></dd>
                    <dd>
                        <a target="_blank" href="#" rel="nofollow">大客户采购</a></dd>
                </dl>
                <dl class="foot-con">
                    <dt data-monitor="home_foot_try">关注360商城</dt>
                    <dd data-monitor="home_help_try">
                        <a target="_blank" href="#" rel="nofollow">360商城大事记</a></dd>
                </dl>
                <dl class="foot-con contactus">
                    <dt>联系我们</dt>
                    <dd class="servicebox">
                        <a href="javascript:;" onclick="showServiceSelector();return false" class="inline-kefu">
                            <img src="/header_files/t019c3c42d7b0ea4f41.png"></a>
                        <a href="javascript:;" target="_blank" class="weixin">
                            <img src="/header_files/t0113493aa732f72837.png">
                            <span class="wxtips"><img src="/header_files/t01d06b994b8798623c.jpg"></span>
                        </a>
                        <a class="weibo" data-monitor="home_foot_weibo" href="http://weibo.com/qikoo360" target="_blank">
                            <img src="/header_files/t0128093bd494ffc7e9.png">
                            <span class="wxtips"><img src="/header_files/t013f6db48422a373d6.jpg"></span>
                        </a>
                    </dd>
                </dl>
            </div>
        </div>
        <div class="footer-copyright">360商城©2013-2016 360公司版权所有 京ICP备08010314号-43 京公网安备11000002000006号</div></div>
    <div class="slidebar" id="slidebar">
        <ul>
            <li class="rfeedback">
                <a target="_blank" href="#" data-monitor="right_fankui_click">用户体验</a></li>
            <li class="rtips rWeChat">
                <a href="javascript:;">微信关注</a>
                <div class="rtipscont rWeChattips">
                    <span class="arrowr-bg"></span>
                    <span class="arrowr"></span>
                    <img src="/header_files/t01d06b994b8798623c.jpg">
                    <p class="tiptext">扫码关注官方微信
                        <br>先人一步知晓促销活动</p></div>
            </li>
            <li class="rtips rstore">
                <a href="javascript:;">手机商城</a>
                <div class="rtipscont rstoretips">
                    <span class="arrowr-bg"></span>
                    <span class="arrowr"></span>
                    <img src="/header_files/t013df41dbfac4d5924.jpg">
                    <p class="tiptext">客户端首次登录
                        <span>送188元现金券礼包</span></p>
                </div>
            </li>
            <li style="visibility:hidden;" class="topback">
                <a data-monitor="right_top_click" href="javascript:;" class="gotop">返回顶部</a></li>
        </ul>
    </div>
    <div id="serviceSelectorMask"></div>
    <div class="fixed dialog" id="serviceSelector">
        <span class="icon close" onclick="hideServiceSelector()"></span>
        <p class="title">产品咨询</p>
        <p class="description">咨询时间
            <em>8:00-22:00</em></p>
        <ul class="flex">
            <li class="phone" onclick="openNtalker(true)">360手机&amp;配件</li>
            <li class="watch" onclick="openNtalker()">360儿童手表</li>
            <li class="recorder" onclick="openNtalker()">360行车记录仪</li>
            <li class="camera" onclick="openNtalker()">360智能摄像头</li>
            <li class="more" onclick="openNtalker()">其他产品</li>
        </ul>

    </div>
    
</body>
<script src ="/header_files/header.js"></script>
<script src="/header_files/land.js"></script>
   
  
  </body>

</html>